#pragma once
#include "../mqcommon/helper.hpp"
#include "../mqcommon/logger.hpp"
#include "../mqcommon/msg.pb.h"
#include <functional>
#include <mutex>

using ConsumerCallback = std::function<void(const std::string& tag, const BasicProperty* bp, const std::string& body)>;
struct Consumer             //和服务端的一样
{
    using Ptr = std::shared_ptr<Consumer>;

    std::string tag;
    std::string queueName;
    bool autoAck;
    ConsumerCallback callback;
    Consumer(const std::string& tagValue, const std::string& queueNameValue, bool autoAckValue, const ConsumerCallback& cb)
        :tag(tagValue)
        ,queueName(queueNameValue)
        ,autoAck(autoAckValue)
        ,callback(cb)
    {}
};
